﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Oracle.DataAccess.Client;

namespace Urgencias
{
    public partial class mostrar : Form
    {
        String db = "User id = CLINICA; Password = 123; Data Source = XE;";
        OracleConnection connection = new OracleConnection();
        public mostrar()
        {
            InitializeComponent();
            connection.ConnectionString = db;
            cargar();
        }
        private void cargar()
        {
            connection.Open();
            String sql = "SELECT * FROM paciente";
            OracleDataAdapter datos = new OracleDataAdapter(sql, connection);
            DataSet data = new DataSet();
            datos.Fill(data, "paciente");
            dgvPaciente.DataSource = data;
            dgvPaciente.DataMember = "paciente";
            connection.Close();
        }
    }
}
